paned: minus the size by the handle for the for_child1 computation.
authorAlban Browaeys <prahal@yahoo.com>
Wed, 7 Aug 2013 16:46:07 +0000 (18:46 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 14 Aug 2013 04:10:08 +0000 (00:10 -0400)
Fixes:
(rhythmbox:22802): Gtk-CRITICAL **:
_gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed

that is gtk_paned_get_preferred_size_for_opposite_orientation calls
_gtk_widget_get_preferred_size_for_size on child2 with a negative
size.

As gtkpaned size was (32), child1 minimum size was (55) then
for_child1 became (32) for an handle_size of (5). Thus for_child2
ended up as (-5).

https://bugzilla.gnome.org/show_bug.cgi?id=705624

gtk/gtkpaned.c

index b929e4ac8d7563cf1bfe2108b50dcaedaca5b640..73aa1aa0913921217bffa15312973b8dada5d6ba 100644 (file)
@@ -995,7 +995,7 @@ gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget      *widget,
       _gtk_widget_get_preferred_size_for_size (priv->child2, priv->orientation, -1, &child2_req, NULL, NULL, NULL);
 
       gtk_paned_compute_position (paned,
-                                  size, child1_req, child2_req,
+                                  size - handle_size, child1_req, child2_req,
                                   NULL, NULL, &for_child1);
 
       for_child2 = size - for_child1 - handle_size;